using System.Runtime.Serialization;


namespace BusinessLogic.Connectivity.Entities
{
	[DataContractAttribute]
	public class ServerResponse<TPayloadType> where TPayloadType : class
	{
		public ServerResponse(ServerResponseCode serverResponseCode, string details, TPayloadType payload, string ticket)
		{
			ServerResponseCode = serverResponseCode;
			Details = details;
			Payload = payload;
			Ticket = ticket;
		}

		[DataMember]
		public ServerResponseCode ServerResponseCode { get; set; }

		[DataMember]
		public string Details { get; set; }

		[DataMember]
		public TPayloadType Payload { get; set; }

		[DataMember]
		public string Ticket { get; set; }
	}
}